package com.xjh.serverinspect.util;

import lombok.Getter;

/**
 * <p>
 * 响应状态码枚举
 * </p>
 *
 * @author xujinghui
 * @since 2024-12-12
 */
@Getter
public enum ResponseCodeEnum {

    SUCCESS(200, "成功"),
    ERROR(500, "系统异常"),
    PARAM_ERROR(400, "参数错误"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "无权限"),
    CAPTCHA_ERROR(418, "验证错误"),
    USERNAME_OR_PASSWORD_ERROR(555, "用户名或密码错误"),
    TOKEN_ERROR(5001, "token错误");


    private final Integer code;

    private final String message;

    ResponseCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
